package com.gzhryc.shared_device.cdcz.core;

import com.gzhryc.shared_device.cdcz.core.models.CDCZChargeCommand;
import com.gzhryc.shared_device.cdcz.core.models.CDCZExecuteResult;

public interface ICDCZNetworkService {

    /**
     * 充电
     * @param chargeCommand //充电命令
     * @return
     */
    public CDCZExecuteResult charge(CDCZChargeCommand chargeCommand);

    public CDCZExecuteResult closeCharge(String deviceSn,Integer slotNum);

    /**
     * 查询设备信息
     * @param deviceSn 主机设备序列号
     * @return
     */
    public CDCZExecuteResult searchDevice(String deviceSn);

    /**
     * 重启主机
     * @param deviceSn
     * @return
     */
    public CDCZExecuteResult restart(String deviceSn);

    /**
     * 查询从机设备
     * @param mainDevice
     * @param bindIndex
     * @return
     */
    public CDCZExecuteResult findSlaveDevice(String mainDevice,Integer bindIndex);

    /**
     * 绑定从机设备
     * @param mainDevice
     * @param deviceSn
     * @return
     */
    public CDCZExecuteResult bindSlaveDevice(String mainDevice,Integer bindIndex,String deviceSn);

    /**
     * 删除从机设备
     * @param mainDevice
     * @return
     */
    public CDCZExecuteResult removeSlaveDevice(String mainDevice);

    /**
     * 切换MQTT连接
     * @param deviceSn
     * @param type
     * @param ip
     * @param port
     * @param userName
     * @param userPwd
     * @return
     */
    public CDCZExecuteResult changeMQTTConnect(String deviceSn,String type,String ip,String port,String userName,String userPwd);

    /**
     * 下载固件
     * @param deviceSn
     * @param packagePath
     * @param packageCRC
     * @return
     */
    public CDCZExecuteResult upgradeDownload(String deviceSn,String packagePath,String packageCRC);

    /**
     * 升级固件
     * @param deviceSn
     * @param packagePath
     * @param packageCRC
     * @return
     */
    public CDCZExecuteResult upgrade(String deviceSn,String packagePath,String packageCRC);
}
